package cn.exrick.xboot.flow.service;

import cn.exrick.xboot.common.vo.Result;
import cn.exrick.xboot.modules.base.entity.User;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.exrick.xboot.flow.entity.FlowUserinfo;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zy
 * @since 2022-08-31
 */
public interface IFlowUserinfoService extends IService<FlowUserinfo> {

    /**
     * 分页查询
     *
     * @param bootStrapTable
     * @param flowUserinfo
     * @return
     */
    IPage<FlowUserinfo> selectPage(Page<FlowUserinfo> page, FlowUserinfo flowUserinfo);

    List<FlowUserinfo> selectList(FlowUserinfo flowUserinfo);

    boolean checkAuth(String templateId,String templateVersion, User user);

    void addFlowUserinfos(List<FlowUserinfo> flowUserinfos, String templateId,String templateVersion,Integer userType,Integer dataType);
    /**
     * 根据模板id获取被审核人
     * @param templateId
     * @return
     */
    Result<Object> getUserinfoOnHontUser(String templateId);
}